Skip to content

Handle state evolution without breaking state compatibility #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

arnaud-daroussin
Copy link
Contributor

Hi @novakov-alexey,

As designed in the issue #240, here is my proposal to handle state evolution without breaking state compatibility.

ScalaCaseObjectSerializer has not the issue because it doesn't serialize serializers, but I added MapSerializer in addition of the previous list.

Write a test that reproduces the issue and shows this PR fixes it was hard, please have a look at MapSerializerSnapshotTest. I didn't write a test for each serializer snapshot, but the logic is the same.

I was surprised to see no tests for Flink 2, I created the root test folder, but maybe tests for Flink 1 should be duplicated for Flink 2 also?

As said in the issue, I can also do these changes for Flink 1, but it will break the state compatibility.

Thanks

@novakov-alexey
Copy link
Collaborator

Looks good. Thanks.

Tests were left in Flink 1.x API, however it would be better to make them available for both Flink versions. I do not have an idea how this can be done at the moment. We should not duplicate tests, because it will add even more maintenance work.

@novakov-alexey novakov-alexey merged commit 6973146 into flink-extended:master Apr 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants